//
//  NSObjectAdditions.h
//  Tint
//
//  Created by Kevin Wu on 2/22/12.
//  Copyright (c) 2012 Telligenty. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSObject (Tint)

/*
 * Creating and Class
 */
+ (id)make;
+ (NSString *)classString;
- (NSString *)classString;

/*
 * Associate object
 */
- (void)associateValue:(id)value withKey:(void *)key;
- (void)weaklyAssociateValue:(id)value withKey:(void *)key;
- (id)associatedValueForKey:(void *)key;

/*
 * KVC
 */
- (BOOL)isValueForKeyPath:(NSString *)keyPath equalToValue:(id)value;
- (BOOL)isValueForKeyPath:(NSString *)keyPath identicalToValue:(id)value;
+ (NSArray *)propertyNames;
+ (NSDictionary *)propertyAttributes;
+ (NSString *)attributeForProperty:(NSString *)property;

/*
 * Sending messages
 */
- (id)runSelector:(SEL)selector withObjects:(NSArray *)objects;
- (id)runSelectorOnMainThread:(SEL)selector withObjects:(NSArray *)objects;

- (NSInvocationOperation *)runSelectorInBackgroundQueue:(SEL)selector withObject:(id)p1;
- (NSInvocationOperation *)runSelectorInBackgroundQueue:(SEL)selector withObject:(id)p1 dependencies:(NSArray *)dependencies priority:(NSOperationQueuePriority)priority;

- (id)runSelector:(SEL)selector;
- (id)runSelector:(SEL)selector withObject:(id)p1;
- (id)runSelector:(SEL)selector withObject:(id)p1 withObject:(id)p2;
- (id)runSelector:(SEL)selector withObject:(id)p1 withObject:(id)p2 withObject:(id)p3;
- (id)runSelector:(SEL)selector withObject:(id)p1 withObject:(id)p2 withObject:(id)p3 withObject:(id)p4;
- (id)runSelector:(SEL)selector withObject:(id)p1 withObject:(id)p2 withObject:(id)p3 withObject:(id)p4 withObject:(id)p5;
- (id)runSelector:(SEL)selector withObject:(id)p1 withObject:(id)p2 withObject:(id)p3 withObject:(id)p4 withObject:(id)p5 withObject:(id)p6;

- (id)runSelectorOnMainThread:(SEL)selector;
- (id)runSelectorOnMainThread:(SEL)selector withObject:(id)p1;
- (id)runSelectorOnMainThread:(SEL)selector withObject:(id)p1 withObject:(id)p2;
- (id)runSelectorOnMainThread:(SEL)selector withObject:(id)p1 withObject:(id)p2 withObject:(id)p3;
- (id)runSelectorOnMainThread:(SEL)selector withObject:(id)p1 withObject:(id)p2 withObject:(id)p3 withObject:(id)p4;
- (id)runSelectorOnMainThread:(SEL)selector withObject:(id)p1 withObject:(id)p2 withObject:(id)p3 withObject:(id)p4 withObject:(id)p5;
- (id)runSelectorOnMainThread:(SEL)selector withObject:(id)p1 withObject:(id)p2 withObject:(id)p3 withObject:(id)p4 withObject:(id)p5 withObject:(id)p6;

@end
